<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Login</title>
    </h:head>
    <h:body>        
        <p:panel id="panellogin" header="Login" style="width: 600px" >            
            <h:form >
                
                <h:panelGrid columns="3">
                    <h:outputText value="Código"/>
                    <p:inputText id="codigo" required="true" requiredMessage="Informe o código" value="#{autenticacaoAutorizacaoBean.usuario.codigo}"/>                                         
                    <p:message for="codigo"/>

                    <h:outputText value="Senha"/>
                    <p:password id="senha" required="true" requiredMessage="Informe a senha" value="#{autenticacaoAutorizacaoBean.usuario.senha}"/>                                         
                    <p:message for="senha"/>
                </h:panelGrid>
                <hr/>
                <p:outputPanel layout="block" 
                               style="margin: auto; width:40%">
                    <p:commandButton value="Entrar" ajax="false" action="#{autenticacaoAutorizacaoBean.login()}"/>
                </p:outputPanel>     
                
            </h:form>
        </p:panel>  
       </div>     
    </h:body>
</html>

